package com.foreknow.dao;

import com.foreknow.model.Guestbook;
import com.foreknow.util.Pagination;

import java.sql.SQLException;
import java.util.List;

public interface GuestbookDao {
  /*
    添加留言信息
   */
    public  boolean addMessage(Guestbook guestbook) throws SQLException;
    /*
     查询所有信息
     */
    public List<Object> getQueryAll() throws  SQLException;



    public  boolean delectByid(Integer id) throws  SQLException;

  /**
   * 修改
   * @param guestbook
   * @return
   * @throws SQLException
   */
  public boolean update(Guestbook guestbook)throws SQLException ;

  /**
   * 查找id
   * @param id
   * @return
   */
  public Guestbook getid(int id);

  /**
   *  分页查询留言信息
   * @param pageSize  每页显示的记录数
   * @param pageNumber  当前页码
   * @return
   * @throws SQLException
   */

  public Pagination getGuestbookByPage(int pageSize,int pageNumber)throws SQLException;

}
